package com.zzh.demo;

import com.zzh.demo.client.YtApiClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author yegen
 * @create -02-06 15:30
 */
@Configuration
@ConfigurationProperties("ytapi.client")
@Data
@ComponentScan
public class YtApiClientConfig {
    private String accessKey;
    private String secretKey;

    @Bean
    public YtApiClient ytApiClient(){
        return new YtApiClient(accessKey,secretKey);
    }
}
